import validateRule from './validateRule';

const SPECK = false;
const VERSION = false;
const CONSOLE = {
  use: process.env.NODE_ENV === 'development',
  level: 0,
};
const DelayLoadingCloseTime = 0.1;
let LocalURL = {
  protocol: 'http',
  origin: '192.168.5.128',
  port: 8866,
  projectName: 'api',
  version: 'v1',
  getOrigin: function () {
    return this.protocol +
      '://' +
      this.origin +
      ':' +
      this.port;
  },
  getBaseUrl: function () {
    return this.getOrigin() +
      '/' +
      this.projectName +
      '/' +
      (VERSION ? this.version : '') +
      (VERSION ? '/' : '');
  },
};
const Project = {
  name: 'safety',
  id: 2,
  appCode: 'safety',
  url: 'http://192.168.5.128:8866/safeGate/sso/login',
  getUrl: function () {
    return LocalURL.getOrigin() + '/' + this.appCode;
  },
};

export {
  validateRule,
  DelayLoadingCloseTime, // 模拟连续的请求
  SPECK, // 是否启用 语音功能
  LocalURL, // 本机 服务器
  VERSION, // 是否启用 本机 API的版本号
  CONSOLE, // 是否启用 console 输出
  Project, // 本项目属性
};
